package com.ruoyi.project.api.service.impl;

import cn.hutool.db.Db;
import cn.hutool.db.sql.StatementWrapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.ruoyi.project.api.service.Test39Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author anan.
 * @version 1.0
 * @create 2021-04-08 16-16
 */
@Service
public class Test39ServiceImpl implements Test39Service
{

    @Autowired
    private JdbcTemplate jdbcTemplate;

    @Override
    @DS("test39")
    public List select(String sql)
    {
        return jdbcTemplate.queryForList(sql);
    }
}
